﻿@model Meal
@{
    ViewBag.Title = "Picture";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    @Mui.Picture @Model.Name</h2>

 <img  src='@Url.Content("~/pictures/Meals/" + (Model.HasPic ? Model.Id : 0) + ".jpg?"+DateTime.Now.Ticks.ToString())'  alt='picture' />
@using (Html.BeginForm("Picture", "Meal", FormMethod.Post, new { enctype = "multipart/form-data" }))
{     
    <input type="hidden" id="id" name="id" value="@Model.Id" />
    <input type="file" id="fileUpload" name="fileUpload" />
    <input type="submit" value="@Mui.upload_file" />   
}
